home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Suzy B Software 2
/
Suzy B Software CD-ROM 2 (1994).iso
/
prntutil
/
jetemu
/
jetemu.doc
< prev
next >
Wrap
Text File
|
1995-04-25
|
5KB
|
127 lines
JETEMU.PRG V1.0x
Disclaimer:
This program is public domain and may be copied and distributed free
of charge, provided that all files are included (that is:
JETEMU.PRG
JETEMU.DOC
PGS1.PRT)
There are no garanties concerning its performance. I am not
responsible for any damage resulting from its use.
--------------------------------------------------
This little program arose out of the need to verify printer data that
is being sent to the DeskJet printer family. Ever since working with
the SPECTRE MacIntosh Emulator I experienced some odd things about
printing to the DeskJet from this setup. The printer would choke on
data, then stop for a while and pick up printing after it had lost half
a page or so of data.
Using a Null Modem cable between to STs, printing to the modem port
from the ST running SPECTRE and receiving on the real ST with STALKER,
running a little program that writes the received bytes straight to
disk I am able to capture the stuff that would normally be sent to the
DeskJet.
Not unlike PostScript╛, the printer language of the DeskJet (HP PCL III)
is quite readable (Ok, not quite as readable...). So I started to scan
the printer data for maybe corrupt sequences that could cause the
printer to choke. However, on a regular 8.5x11" page those are up to
3300 lines of data. So I started writing a little interpreter (in
PostScript╛ they call that Display Postscript). And JetEmu is the
result.
It has only one function: Load a DeskJet printer file (that has been
created on disk by any application capable of doing so), and displaying
the resulting page on the screen. Each dot on the screen thereby
represents one dot sent to the printer. Since most printing is done in
300dpi one inch on paper is blown up to about half a screen. But at
least you can see some details. So JetEmu can also be used as print
preview for all programs that can _print to disk_ with a DeskJet
driver.
When you run JetEmu you are presented with a file selector. You can
select any file, however, non-printer files could cause trouble. There
is only a limited format check (all printer drivers I know send a
Dots-Per-Inch command before sending any data, therefore if JetEmu
doesn't find such a command it won't process the file).
Current limitations:
1) At the moment the two compaction modes in HP PCL III are not
decoded. I am working on this, but couldn't get any information yet,
of how to decode this. It is time consuming to try to find out by
myself.
2) ONLY graphic commands are displayed on screen. This means that
straight ASCII characters in a print file will be ignored.
Most DeskJet printer files come in very respectable sizes. Output from
Pagestream can be up to 1.5 Meg per page (depending on how dense the
page is). In addition JetEmu builds up a virtual page in RAM. For a
8.5x11" page the virtual page is around 1 Meg. So under 2.5 Meg of
RAM it is probably problematic to run the program.
I tried to make the program consistent with GEM rules, although I
don't have any other hardware than a monochrome ST/MegaSte. It works
on the MONSTER big screen emulation. It will not work in color, at
the moment!
Here are the menu selections:
JetEmu
About JetEmu...
You know what...
Other
Open...
To load another file select this option. After the file has
been successfully loaded, it may take a few seconds (up to 30),
until the the virtual page is ready. The busy bee tells you
that the computer didn't crash.
Info...
DPI: resolution of the printer file
Virtual Page Width: width in pixels of virtual page (2550 at
8.5")
Virtual Page Height:height in pixels of virtual page (3300 at
11")
RAM used: The virtual page uses this amount of your
RAM (~(DPI*(Page Width/8)*Page Height)
File size: Size of your original printer file.
Click Ok to go on.
Goto...
Enter directly where you want to go on the virtual page. ALL
values are accepted, try to stay pretty much within the virtual
page area (after all what you see on the screen is a portion of
the ST RAM, so too high values can easily get into protected
memory locations).
Ok to go with the values
Cancel to abort.
Quit
What do you think?
All window gadgets work as you would expect and the program uses
VDI/AES exclusively, so it should work on most machines. (Not yet
color).
As time permits I would like to fix the problems and add features:
1) color support
2) decode HP compacted graphics
3) emulate other printers (loadable modules)
4) suggestions are welcome, source code available
Bloomington, 1/24/93